import {request} from './request.js';

const get = (url, data = {},header = {},loading = true) => {
	return request({
		url: url,
		method: 'GET',
		data: data,
		header: header
	},loading)
};

const post = (url, data = {},header = {},loading = true) => {
	return request({
		url: url,
		method: 'POST',
		data: data
	},loading)
};

const put = (url, data = {},header = {},loading = true) => {
	return request({
		url: url,
		method: 'PUT',
		data: data
	},loading)
};

const Delete = (url, data = {},header = {},loading = true) => {
	return request({
		url: url,
		method: 'DELETE',
		data: data
	},loading)
};

const http = {
	get,
	post,
	put,
	Delete
}

export {
	http
}
